package info.ask4research.model.enums;

public enum ServiceType {

	
	ALLPERSONS(0), INDIVIDUAL(1);
	
	private int id;

	private ServiceType(int id) {
		this.id = id;
	}
	
	public int getId() {
		return this.id;
	}
	
    public static ServiceType valueOf(int value) {
        switch (value) {
            case 0: return ALLPERSONS;
            case 1: return INDIVIDUAL;
            default: return ALLPERSONS;
        }
    }
    
    public String getName() {
		switch(this.id) {
		case 0:
			return "ALLPERSONS";
		case 1:
			return "INDIVIDUAL";
		default:
			return "ALLPERSONS";
		}
	}
    
    @Override
    public String toString() {
		switch(this.id) {
		case 0:
			return "ALLPERSONS";
		case 1:
			return "INDIVIDUAL"; 
		default:
			return "ALLPERSONS";
		}
    }
    
}
